/*
 * McpConfig.java
 * Copyright 2025 Churan Tech, all rights reserved.
 * Churan PROPRIETARY/CONFIDENTIAL, any form of usage is subject to approval.
 */

package com.churan.ai.mcp.server.weather.stdio.config;

import com.churan.ai.mcp.server.weather.stdio.service.HeFengWeatherAirService;
import org.springframework.ai.tool.ToolCallbackProvider;
import org.springframework.ai.tool.method.MethodToolCallbackProvider;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Function: mcp config
 *
 * @author churan
 * @date: 2025年5月19日
 */
@Configuration
public class McpConfig {

    @Bean
    public ToolCallbackProvider weatherTools(HeFengWeatherAirService weatherService) {
        return MethodToolCallbackProvider.builder()
                .toolObjects(weatherService)
                .build();
    }
}
